/**
 * 
 */
package com.yuedao.sender.model;

import javax.persistence.Entity;

import cn.ydx.protobuf.OTIpcDef;

/**
 * @author Jason Biao
 *
 *网约车乘客基本信息接口
 */
@Entity
public class BaseInfoPassenger extends BaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = -7918785313331045958L;

	private String registerDate;
	
	private String passengerPhone;
	
	private String passengerName;
	
	private String passengerGender;

	private int state;
	
	public String getRegisterDate() {
		return registerDate;
	}

	public void setRegisterDate(String registerDate) {
		this.registerDate = registerDate;
	}

	public String getPassengerName() {
		return passengerName;
	}

	public void setPassengerName(String passengerName) {
		this.passengerName = passengerName;
	}

	public String getPassengerGender() {
		return passengerGender;
	}

	public void setPassengerGender(String passengerGender) {
		this.passengerGender = passengerGender;
	}

	public String getPassengerPhone() {
		return passengerPhone;
	}

	public void setPassengerPhone(String passengerPhone) {
		this.passengerPhone = passengerPhone;
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	 public static OTIpcDef.BaseInfoPassenger convert(BaseInfoPassenger data){
	        OTIpcDef.BaseInfoPassenger item = OTIpcDef.BaseInfoPassenger.newBuilder()
	                .setCompanyId(data.getCompanyId())
	                .setPassengerPhone(data.getPassengerPhone()==null?" ":data.getPassengerPhone())
	                .setState(data.getState())
	                .setFlag(data.getFlag())
	                .setUpdateTime(data.getUpdateTime()==null?0l :Long.valueOf(data.getUpdateTime()))
	                .setPassengerGender(data.getPassengerGender()==null?"":data.getPassengerGender())
	                .setRegisterDate(data.getRegisterDate() == null?0l:Long.valueOf(data.getRegisterDate()))
	                .setPassengerName(data.getPassengerName()==null?"":data.getPassengerName())
	                .build();
	        return item;
	    }

	@Override
	public String toString() {
		return "BaseInfoPassenger [registerDate=" + registerDate
				+ ", passengerPhone=" + passengerPhone + ", passengerName="
				+ passengerName + ", passengerGender=" + passengerGender
				+ ", state=" + state + "]";
	}
	 
}
